Dear folks, void getModifications(Skip sData) { Buffer bSource = create Buffer bTarget = create Buffer bResult = create bSource = "" bTarget = "New" diff(bResult, bSource, bTarget, "\\cf1\\strike ", "\\cf3\\ul ") put(sData, 1, stringOf bResult) bSource = "Delete" bTarget = "" diff(bResult, bSource, bTarget, "\\cf1\\strike ", "\\cf3\\ul ") put(sData, 2, stringOf bResult) bSource = "Before" bTarget = "After" diff(bResult, bSource, bTarget, "\\cf1\\strike ", "\\cf3\\ul ") put(sData, 3, stringOf bResult) delete bSource delete bTarget delete bResult } DB db DBE textbox Skip sData = create Buffer sReport = create string str getModifications sData db = create "Report" textbox = richText(db, "Report", "", 400, 100, false) sReport = "" sReport = "{\\b Report}" "\n\n" for str in sData do { sReport = sReport str "\n" } realize db useRTFColour(textbox, true) set(textbox, tempStringOf sReport) show db delete sData delete sReport When I execute this program, I get the following output: NewDeleteBeforeAfter instead of: New Delete BeforeAfter I think in some moment the buffer sReport is "eating" the newlines. I couldn't find any help about "tempStringOf" function in "DXL Reference Manual". It is just used as part of an example. Can you help me? Thanking you in advance, Ilma Orellana. Ilma_Orellana - Tue May 10 11:30:50 EDT 2011 |
Re: Buffer "eats" newlines sReport = sReport str "\\par "
Tsk tsk tsk, your use of buffer sReport is hopeless. Change it to this: sReport += str sReport += "\\par " That is, add the strings to the buffer. As it is you are extracting the string and concatenating it which pretty much eliminates the use of the buffer. |
Re: Buffer "eats" newlines llandale - Tue May 10 11:59:35 EDT 2011
Tsk tsk tsk, your use of buffer sReport is hopeless. Change it to this: sReport += str sReport += "\\par " That is, add the strings to the buffer. As it is you are extracting the string and concatenating it which pretty much eliminates the use of the buffer. Thank you very much for your advices, now my program works properly. Ilma. |